import numpy

def cdf(s):
    '''
    Compute and return the cumulative distribution function of an array of values.
    Inputs:
        s           : a one dimensional numpy array of values.
    Returns:
        x           : a one dimensional numpy array
        y           : a one dimensional numpy array
    FIXME this is nonsense
    '''
    n = len(s)
    x = numpy.repeat(s,2)
    y = numpy.hstack([0.0,numpy.repeat(numpy.arange(1,n) / float(n), 2),1.0])

    return (x,y)
